-- ----------- MySql -----------------
-- 创建库
CREATE DATABASE mybatis_plus_atguigu;
-- 使用库
USE mybatis_plus_atguigu;
-- 创建表
CREATE TABLE tbl_employee
(
    id        INT(11) PRIMARY KEY AUTO_INCREMENT,
    last_name VARCHAR(50),
    email     VARCHAR(50),
    gender    CHAR(1),
    age       INT
);
INSERT INTO tbl_employee(last_name,email,gender,age) VALUES('Tom','tom@126.com',1,22);
INSERT INTO tbl_employee(last_name,email,gender,age) VALUES('Jerry','jerry@126.com',0,25);
INSERT INTO tbl_employee(last_name,email,gender,age) VALUES('Black','black@126.com',1,30);
INSERT INTO tbl_employee(last_name,email,gender,age) VALUES('White','white@126.com',0,35);


CREATE TABLE tbl_user
(
    id         INT(11) PRIMARY KEY AUTO_INCREMENT,
    name       VARCHAR(50),
    logic_flag INT(11)
);



-- ----------- Oracle -----------------
-- 创建一个测试表
drop table tbl_user;
create table tbl_user
(
    id number (11) primary key,
    name varchar2 (50),
    logic_flag number (11)
);

-- 创建序列
create sequence seq_user start with 100 increment by 2 ;

-- ----------- 序列的常用操作 ------------
-- 查询序列的下一个值
select seq_user.nextval from dual;

-- 查询序列的当前值
select seq_user.currval from dual ;